<@admin.html >
	<script type="text/javascript" src="${base}/scripts/admin/event/index.js"></script>
	<div class="title">
					<h1>广告管理</h1>
					<span class="tTip"></span>
				</div>
				<div class="box">
						<div class="tx_table" id="candid_list">
							<form name="removeForm" id="removeForm" method="post" action="${base}/admin/adv/index!remove">
								<div class="data">
									<div class="tx_sender l_tr" style="padding:5px 10px;">
										<input class="step" name="" type="button" value="删 除" onClick="removeAdv();"/>
										<input class="step" name="" type="button" value="添加新广告" onclick="window.location='${base}/admin/adv/index!add'"/>						
									</div>
									<table class="l_tc">
										<caption>广告列表</caption>
										<thead>
											<tr>
												<th><input class="C" type="checkbox" value="" onclick="checkAll(this);"/></th>
												<th>广告位标题</th>
												<th>广告位代码</th>
												<th>操作</th>
											</tr>
										</thead>
										<tbody>
										<#if (advertisementPage.result)??>
										<#list advertisementPage.result as advertisement>
											<tr <#if advertisement_index%2 != 0> class="c_odd" </#if>>
												<td><input class="C items" type="checkbox" value="${(advertisement.id?c)}" name="ids"/></td>
												<td>
													${(advertisement.bannerTitle)!}
												</td>
												<td>${(advertisement.code)!}</td>
												<td>
													<a class="c_modi" href="${base}/admin/adv/index!add?id=${(advertisement.id?c)!}">编辑</a>
												</td>
											</tr>
										</#list>
										</#if>							
										</tbody>
									</table>
								</div>
							</form>
							<@admin.pagination_admin div="candid_list" />
						</div>
				</div>
</@admin.html >

<script>
//删除
function removeAdv(){
    if (isChecked()) {
        var result = confirm("确定要进行该操作吗？该操作不可逆转");
        if (result) {
            $("#removeForm").submit();
        }
    }
    else {
        showResult("提示信息", "操作有误", "请至少选择一个广告", "failed");
    }
}
</script>